<?php

require_once 'common/common.php';
require_once 'common/conn.php';

$id = getParameter("id");
$data = array();
if ($id != "") {
    $db = new DBC();
    $sql = "SELECT d.name,d.infoID,d.click,p.* FROM t_search_detail d,t_product p WHERE d.infoID = " . $id . " AND d.code = p.flashcode";
    $data = $db->fetchData($sql);
}
echo json_encode($data);
?>